package com.wyf.service;

import com.wyf.dao.UserDao;
import com.wyf.pojo.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    /**
     * 通过用户ID查询用户
     * @param userId
     * @return
     */
    public User queryUser(Integer userId) {
        User user = userDao.queryUserById(userId);
        return user;
    }
}
